<template>
  <div class="head-title">
    <van-nav-bar left-text="返回" :title = title  left-arrow fixed @click-left="onClickLeft" />
      
      <div v-for="(item,index) in this.saveData" :key="index">
          <van-panel title="西游记" desc="总共53集/已上传5集" status="已上传" @click="uploadVideo()" >
          </van-panel>
      </div>
        
    <van-button type="primary" size="large" class="AddBtn" @click='addBtn()'>新增剧集</van-button>
    
  </div>
</template>

<script>

export default {
  data() {
    return {
      list: [],
      loading: false,
      finished: false,
      title:'',
      ID:''
    };
  },
  methods: {

    //返回
    onClickLeft() {
       this.$router.go(-1);
    },
    addBtn(){
        // this.$router.push("/AddVideoNote"); 
          this.$router.push({
            path: "/AddVideoNote",
            query: {
               ID:this.ID
            }
      })
    },
    uploadVideo(){
        this.$router.push("/uploadVideo"); 
    },

    //获取文件保存信息

    GetSaveFileInfo() {
      this.$axios({
        method: "get",
        url: "/api/User/GetSaveFileInfo",
        params: {
          fileid: 0
        }
      })
        .then(res => {
          // debugger
          if (res.data.code === 0) {
            // debugger
            console.log(res.data.data);
            this.saveData = res.data.data
            //  this.images = res.data.data;
            //  console.log(this.images);
            // this.$toast({
            //   duration: 800,
            //   message: "数据已删除"
            // });
          }
          if (res.data.Code == 1) {
            this.$toast({
              duration: 800,
              message: res.data.Message
            });
          }
        })
        .catch(err => {
          console.log(err);
        });
    },

    //以下为无效代码

  },
  //页面初始化钩子函数 created
  created() {
    this.ID = this.$route.query.ID;

    // console.log(ID);
    // this.GetFiles();
    // this.title = this.$route.query.title;
    // this.isActive = 0;
    this.$emit("header", false);
    this.$emit("footer", false);
  },
  //页面初始化钩子函数 mounted
  mounted() {}
};
</script>
<style lang="less" scoped>
    .AddBtn{
        position: absolute;
        bottom: 0;
    }

</style>

